#ifndef ATAXX_H
#define ATAXX_H

#include "Game.h"
class Ataxx : public Game {
public:
	Ataxx(void);
	Ataxx(int columns, int rows);
	virtual ~Ataxx(void);

private:
	static const int maxJump = 2;

	enum Action {
		Split = 7,
		Spread = 8
	};

	virtual bool winCondition();

	virtual bool legalMove( const Move &gameMove ) ;

	/** \brief Construct game special string
	Construct a string for game action, concat after BNF:
	Ataxx
	<gsa>  ::<Base> "Clone " ; <ataxx> <gsa> ; "Spread "<coord> ; "Spread "<coord> <gsa>
	<ataxx>:: "Clone "
	<base> :: (See base class)
	*/
	virtual std::string gameSpecialAction(const Move &gameMove);
	virtual void doGameSpecialAction(std::stringstream &actionStream, const Move &gameMove);
	virtual void getPossibleDestinations(std::vector<std::pair<int,int> > &possibleDestinations, std::pair<int,int> &location);
	/* TODO Maybe should not be overwritten
	virtual std::vector<std::string*> getLegalMoves() {
		std::vector<std::string*> legalMoves(0);
		return legalMoves;
	};
	*/
	virtual void undoSpecialAction(std::stringstream &undoAction, std::stringstream &actionStr);

	virtual void placePieces();
};

/** \brief Helper function
return true if vector distance between the coordinates
is less than or equal to the maxDistance.
@param[in] maxDistance Maximum allowed distance.
@param[in] gameMove const From and To coordinates.
*/
inline bool vectorDistance(const Move &gameMove, int maxDistance);


#endif //ATAXX_H